package com.geek.event;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class DemoListener implements ApplicationListener<DemoEvent> {
    @Override
    public void onApplicationEvent(DemoEvent event) {
        log.info("我(bean-DemoListener)接收到了bean-DemoPublisher {} 发布的消息：{}", event.getSource(), event.getMessage());
    }
}
